package cn.silver.module.authority.domain;

import cn.silver.framework.mybatis.annotation.Table;
import cn.silver.framework.mybatis.annotation.TableField;
import cn.silver.framework.mybatis.enums.SearchTypeEnums;
import cn.silver.framework.mybatis.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 角色和菜单关联 sys_role_menu
 *
 * @author Silver Zhou
 */

@Data
@NoArgsConstructor
@Table(name = "sys_role_menu")
@Schema(name = "SysRoleMenu", title = "角色控制范围")
public class SysRoleMenu extends BaseEntity {

    /**
     * 角色ID
     */
    @Schema(title = "关联角色")
    @TableField(name = "role_id", searchType = SearchTypeEnums.EQ)
    private String roleId;

    /**
     * 菜单ID
     */
    @Schema(title = "关联菜单")
    @TableField(name = "menu_id", searchType = SearchTypeEnums.EQ)
    private String menuId;

    public SysRoleMenu(String roleId, String menuId) {
        this.roleId = roleId;
        this.menuId = menuId;
    }
}
